package com.gzbugu.bugusys.vo.abs;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;

import com.gzbugu.bugusys.vo.Attendance;
import com.gzbugu.bugusys.vo.CoCertificate;
import com.gzbugu.bugusys.vo.ContractService;
import com.gzbugu.bugusys.vo.Reimburse;
import com.gzbugu.bugusys.vo.StaffDocuments;
import com.gzbugu.bugusys.vo.Travel;
import com.gzbugu.bugusys.vo.User;

/**
 * AbstractType entity provides the base persistence definition of the Type
 * entity. @author MyEclipse Persistence Tools
 */
@MappedSuperclass
public abstract class AbstractType implements java.io.Serializable {

	// Fields

	private Short id;
	private String name;
	private Set<User> users = new HashSet<User>(0);
	private Set<Travel> travelsForTypeId = new HashSet<Travel>(0);
	private Set<ContractService> contractServices = new HashSet<ContractService>(
			0);
	private Set<Reimburse> reimbursesForHandIn = new HashSet<Reimburse>(0);
	private Set<Travel> travelsForHandInId = new HashSet<Travel>(0);
	private Set<StaffDocuments> staffDocumentses = new HashSet<StaffDocuments>(
			0);
	private Set<Reimburse> reimbursesForTypeId = new HashSet<Reimburse>(0);
	private Set<Travel> travelsForStatus = new HashSet<Travel>(0);
	private Set<CoCertificate> coCertificates = new HashSet<CoCertificate>(0);
	private Set<Reimburse> reimbursesForStatus = new HashSet<Reimburse>(0);
	private Set<Attendance> attendances = new HashSet<Attendance>(0);

	// Constructors

	/** default constructor */
	public AbstractType() {
	}

	/** minimal constructor */
	public AbstractType(Short id) {
		this.id = id;
	}

	/** full constructor */
	public AbstractType(Short id, String name, Set<User> users,
			Set<Travel> travelsForTypeId,
			Set<ContractService> contractServices,
			Set<Reimburse> reimbursesForHandIn, Set<Travel> travelsForHandInId,
			Set<StaffDocuments> staffDocumentses, 
			Set<Reimburse> reimbursesForTypeId, Set<Travel> travelsForStatus,
			Set<CoCertificate> coCertificates,
			Set<Reimburse> reimbursesForStatus, Set<Attendance> attendances) {
		this.id = id;
		this.name = name;
		this.users = users;
		this.travelsForTypeId = travelsForTypeId;
		this.contractServices = contractServices;
		this.reimbursesForHandIn = reimbursesForHandIn;
		this.travelsForHandInId = travelsForHandInId;
		this.staffDocumentses = staffDocumentses;
		this.reimbursesForTypeId = reimbursesForTypeId;
		this.travelsForStatus = travelsForStatus;
		this.coCertificates = coCertificates;
		this.reimbursesForStatus = reimbursesForStatus;
		this.attendances = attendances;
	}

	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false)
	public Short getId() {
		return this.id;
	}

	public void setId(Short id) {
		this.id = id;
	}

	@Column(name = "name")
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "type")
	public Set<User> getUsers() {
		return this.users;
	}

	public void setUsers(Set<User> users) {
		this.users = users;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "typeByTypeId")
	public Set<Travel> getTravelsForTypeId() {
		return this.travelsForTypeId;
	}

	public void setTravelsForTypeId(Set<Travel> travelsForTypeId) {
		this.travelsForTypeId = travelsForTypeId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "type")
	public Set<ContractService> getContractServices() {
		return this.contractServices;
	}

	public void setContractServices(Set<ContractService> contractServices) {
		this.contractServices = contractServices;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "typeByHandIn")
	public Set<Reimburse> getReimbursesForHandIn() {
		return this.reimbursesForHandIn;
	}

	public void setReimbursesForHandIn(Set<Reimburse> reimbursesForHandIn) {
		this.reimbursesForHandIn = reimbursesForHandIn;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "typeByHandInId")
	public Set<Travel> getTravelsForHandInId() {
		return this.travelsForHandInId;
	}

	public void setTravelsForHandInId(Set<Travel> travelsForHandInId) {
		this.travelsForHandInId = travelsForHandInId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "type")
	public Set<StaffDocuments> getStaffDocumentses() {
		return this.staffDocumentses;
	}

	public void setStaffDocumentses(Set<StaffDocuments> staffDocumentses) {
		this.staffDocumentses = staffDocumentses;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "typeByTypeId")
	public Set<Reimburse> getReimbursesForTypeId() {
		return this.reimbursesForTypeId;
	}

	public void setReimbursesForTypeId(Set<Reimburse> reimbursesForTypeId) {
		this.reimbursesForTypeId = reimbursesForTypeId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "typeByStatus")
	public Set<Travel> getTravelsForStatus() {
		return this.travelsForStatus;
	}

	public void setTravelsForStatus(Set<Travel> travelsForStatus) {
		this.travelsForStatus = travelsForStatus;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "type")
	public Set<CoCertificate> getCoCertificates() {
		return this.coCertificates;
	}

	public void setCoCertificates(Set<CoCertificate> coCertificates) {
		this.coCertificates = coCertificates;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "typeByStatus")
	public Set<Reimburse> getReimbursesForStatus() {
		return this.reimbursesForStatus;
	}

	public void setReimbursesForStatus(Set<Reimburse> reimbursesForStatus) {
		this.reimbursesForStatus = reimbursesForStatus;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "type")
	public Set<Attendance> getAttendances() {
		return this.attendances;
	}

	public void setAttendances(Set<Attendance> attendances) {
		this.attendances = attendances;
	}

}